package com.gdssoft.pdaweb.service.am.impl;

import java.util.List;

import com.gdssoft.core.service.impl.BaseServiceImpl;
import com.gdssoft.pdaweb.dao.am.AmMonthPlanDao;
import com.gdssoft.pdaweb.model.am.AmMonthPlan;
import com.gdssoft.pdaweb.service.am.AmMonthPlanService;


public class AmMonthPlanServiceImpl extends BaseServiceImpl<AmMonthPlan> implements AmMonthPlanService{
    private AmMonthPlanDao dao;
	
	public AmMonthPlanServiceImpl(AmMonthPlanDao dao) {
		super(dao);
		this.dao=dao;
	}

//	@Override
//	public List<AmMonthPlan> getByPlanId(Long id) {
//		return this.dao.getByPlanId(id);
//	}

	@Override
	public AmMonthPlan getByPlanIdAndMonth(Long planId, String thisMonth) {
		List<AmMonthPlan> list = this.dao.listByIdMonth(planId,thisMonth);
		if(list.size()>0)
		{
			return list.get(0);
		}
		return null;
	}


}
